package com.weixing.mall.provider.controller.rpc;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.core.support.BaseController;
import com.weixing.mall.provider.api.model.vo.SysDictVo;
import com.weixing.mall.provider.service.IDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName SysDictRpcController
 * @Description TODO <br/>
 * @Author gjq
 * @Modified By:
 * @Date 2019/12/31
 * @Version 1.0
 **/
@RestController
@RequestMapping("/api/dict")
public class SysDictRpcController extends BaseController {

    @Autowired
    private IDictService sysDictService;

    @GetMapping("getDictByCode")
    public Result<List<SysDictVo>> getDictByCode(String dictGroupCode) {
        List<SysDictVo> list = sysDictService.getDictByCode(dictGroupCode);
        return  ResultUtil.success(list);
    }


}
